package com.whmskj.xjlhbc.domain;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@TableName("dailyAttendanceLogMasterTable")
@Schema(name = "考勤统计响应参数", description = "考勤统计响应参数")
public class DailyAttendanceLogMasterTable {
    private Integer id;

    private String chiefBen;

    @Schema(description = "考勤人数")
    private Long numberOfStaffManaged;

    private Long escorts;

    @Schema(description = "出勤人数")
    private Long numberOfPersonsInAttendance;

    @Schema(description = "缺勤人数")
    private Long numberOfAbsentees;

    private String synchronisingFolderFailedSS;

    @Schema(description = "日期")
    private String dateOfAttendance;

    private String modifyer;


    private String teamLeaderlogisticsManagement;

    private String classnumber;


    @Schema(description = "考勤班组")
    private String classes66;

    @TableField(exist = false)
    @Schema(description = "班次")
    private String classes;

    @Schema(description = "休息人数")
    private Long numberOfPersonsResting;

    @Schema(description = "离职人数")
    private Long separations;

    @Schema(description = "星期几")
    public String getWeek() {
        return dateOfAttendance.length()!=10 ? null : DateUtil.dayOfWeekEnum(DateUtil.parseDate(dateOfAttendance)).toChinese();
    }

}
